<?php
require_once ($_SERVER['DOCUMENT_ROOT'].'/global_oracle.php');
require_once ($_SERVER['DOCUMENT_ROOT'].'/global.php');
$array = array();
$sql = "select a.name,a.id_card,a.code08,a.redr_type_code,a.redr_flag,'25d55ad283aa400af464c76d713c07ad' mima from libsys.reader a ";
$query = oci_parse($connect,$sql);
oci_execute($query,OCI_DEFAULT);
while ($a = oci_fetch_assoc($query)) {
  $sql = "Insert into user (XingMing,XueHao,IdNumber,LeiBie,Status,MiMa)
          values (
          '{$a['NAME']}',
          '{$a['CODE08']}',
          '{$a['ID_CARD']}',
          {$a['REDR_TYPE_CODE']},
          {$a['REDR_FLAG']},
          '{$a['MIMA']}'
          )
          ";
  $mysqli->query($sql);
  // $array[] = $a;
}

?>
